package com.onlyxiahui.common.action.description.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * <br>
 * Date 2020-01-06 17:43:44<br>
 * 
 * @author xiahui [onlovexiahui@qq.com]<br>
 * @since 1.0.0
 */

public class ValidateData {

	private String type;
	private String value;
	private String code;
	private String message;
	private String validatorName;
	private List<String> groups;

	public ValidateData() {
		super();
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public List<String> getGroups() {
		return groups;
	}

	public void setGroups(List<String> groups) {
		this.groups = groups;
	}

	public void addGroup(String group) {
		if (groups == null) {
			groups = new ArrayList<>();
		}
		groups.add(group);
	}

	public String getValidatorName() {
		return validatorName;
	}

	public void setValidatorName(String validatorName) {
		this.validatorName = validatorName;
	}
}
